package java15;

public class Students {
	String[] names = new String[30];

	public void addname(String name) {
		for (int i = 0; i < names.length; i++) {
			if (names[i] == null) {
				names[i] = name;
				break;
			}
		}
	}

	public void showname() {
		for (int i = 0; i < names.length; i++) {
			if (names[i] != null) {
				System.out.print(names[i] + "\t");
			}
		}
		System.out.println();
	}
}
